<?php

class Eleven_Form_Announcement_Post extends Zend_Form
{
	public function init()
	{
	    $this->setDisableLoadDefaultDecorators(true);
        $this->setDecorators(array(
            array(
                'ViewScript',
                array('viewScript'=>'announcement/_post.phtml')
            ),
            'Form'
        ));
        
		$this->addElement('text', 'title', array(
			'required'		=> true,
			'label'			=> '活动标题：',
		));
		
		$this->getElement('title')->setDecorators(array(
            'ViewHelper',
		    'Errors',
        ));
        
        
        $this->getElement('title')->setAttrib('class', 'announcement_title');
        
		
		$this->addElement('textarea', 'content', array(
			'required'		=> true,
			'label'			=> '活动内容：',
		));
		
		$this->getElement('content')->setDecorators(array(
            'ViewHelper',
		    'Errors',
        ));
        
		$this->addElement('submit', 'submit', array(
			'ignore'		=> true,
		));
		
		$this->getElement('submit')->setLabel('')
		    ->setAttrib('class','announcement_submit');;
	}

}

?>